import { AxiosPromise } from 'axios';
import request from '@/utils/request';
import { RespModel, SubmitForm,ExecuriseTypeResp } from '@/api/app/typescript/ExerciseType';

// 锻炼系列
export function typeSeries(query : any) {
    return request({
        url: '/admin/exercise/type/list',
        method: 'get'
    });
}


// 查询详细
export function getByIdApi(id: any):AxiosPromise<RespModel>  {
    return request({
        url: '/admin/exercise/type/search/' + id,
        method: 'get',
    });
}

// 根据主键查询execurise_type表的数据
export function getTypeByIdApi(id: any):AxiosPromise<ExecuriseTypeResp>  {
    return request({
        url: '/admin/exercise/type/' + id,
        method: 'get',
    });
}


// 新增
export function addApi(data: any) {
    return request({
        url: '/admin/exercise/type',
        method: 'post',
        data: data,
    });
}

// 修改
export function updateApi(data: any) {
    return request({
        url: '/admin/exercise/type',
        method: 'put',
        data: data,
    });
}

// 删除岗位
export function delApi(id: any) {
    return request({
        url: '/admin/exercise/type' + id,
        method: 'delete',
    });
}
